diff options
| author | Adam Soltys <[email protected]> | 2024-08-30 20:04:29 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-08-30 20:04:29 -0700 |
| commit | df71664f20312e81134ee90ad561f55d3020ee0a (patch) | |
| tree | 3986d1c5aac77f256ed1091290bc067c899e2196 /src/routes/(app)/ecash/[id]/+layout.server.ts | |
| parent | 20337319212896c484ac0f8d3dfbac3b8d26f089 (diff) | |
| download | coinos-ui-df71664f20312e81134ee90ad561f55d3020ee0a.tar.gz coinos-ui-df71664f20312e81134ee90ad561f55d3020ee0a.zip | |
typescript
Diffstat (limited to 'src/routes/(app)/ecash/[id]/+layout.server.ts')
| -rw-r--r-- | src/routes/(app)/ecash/[id]/+layout.server.ts | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/routes/(app)/ecash/[id]/+layout.server.ts b/src/routes/(app)/ecash/[id]/+layout.server.ts new file mode 100644 index 00000000..0b8b2917 --- /dev/null +++ b/src/routes/(app)/ecash/[id]/+layout.server.ts @@ -0,0 +1,10 @@ +import { auth, get } from "$lib/utils"; +import { fail, redirect } from "@sveltejs/kit"; +import parse from "$lib/parse"; + +export async function load({ cookies, params, request, url }) { + let { id } = params; + let { token, status } = await get(`/cash/${id}`); + let { spent, total, mint, external } = status; + return { id, token, spent, total, mint, external }; +} |
